//
//  SACustomerMdoel.m
//  SAP
//
//  Created by 中矿科技有限公司 on 17/9/15.
//  Copyright © 2017年 中矿科技有限公司. All rights reserved.
//

#import "SACustomerMdoel.h"

@implementation SACustomerMdoel

+(NSArray *)getCustomerLsitfromData:(NSData *)data{
    NSDictionary *dict =[NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];
    NSMutableArray *result =[NSMutableArray array];
    
    
    if (![dict[@"result"] isKindOfClass:[NSDictionary class]]) {
        return result;
    }
    if (![dict[@"result"][@"items"] isKindOfClass:[NSArray class]]) {
        return result;
    }
    for (NSDictionary * typeDict in dict[@"result"][@"items"] ) {
        SACustomerMdoel *model =[SACustomerMdoel mj_objectWithKeyValues:typeDict];
        [result addObject:model];
    }
    return result;
}

+ (NSDictionary *)mj_replacedKeyFromPropertyName
{
    return @{
             @"Id" : @"id",
             };
}

@end
